<?php include "../public/header.php";?>
<?php include "../public/header_show.php";?>
<body id="xiangqingPage">
<div id="xiangqingBox">
    <div class="page-title">
        <div class="page-title-con">
            <span class="pageshowtitle">详情</span>
            <div class="page-title-opt-list">
                <?php include "../public_flow/flow_show_optbut.php";?>
                <button class="layui-btn layui-btn-sm btn-light marginr5 opt">
                    操作<i class="layui-icon layui-icon-down layui-font-12"></i>
                </button>
                <span id="page-close" class="page-close" onclick="layer_close()">×</span>
            </div>
        </div>
    </div>
    <div class="main-container">

        <div><?php include "../public_flow/flow_show_info.php";?></div>

        <div class="table-box tablenes">
            <div class="title">巡检信息</div>
            <table class="layui-table">
                <tbody>
                <tr><td class="tt">工程名称</td><td class="tv colorlan" id="enginid_name"></td><td class="tt">检查类型</td><td id="chatype_name" class="tv"></td></tr>
                <tr><td class="tt">检查人</td><td class="tv" id="chaer"></td><td class="tt">检查日期</td><td id="chadt" class="tv"></td></tr>
                <tr><td class="tt">检查概况</td><td class="tv" id="chagai" colspan="3"></td></tr>
                <tr><td class="tt">存在问题</td><td class="tv" id="cunwen" colspan="3"></td></tr>
                <tr><td class="tt">是否需整改</td><td class="tv" id="isxu" colspan="3"></td></tr>

                <tr class="isxu_info layui-hide"><td class="tt">整改要求</td><td class="tv" id="gaiqiu" colspan="3"></td></tr>
                <tr class="isxu_info layui-hide"><td class="tt">整改负责人</td><td class="tv" id="gaier"></td><td class="tt">要求完成日期</td><td id="yaodt" class="tv"></td></tr>
                <tr class="isxu_info layui-hide"><td class="tt">是否已整改</td><td class="tv" id="iszheng" colspan="3"></td></tr>
                <tr class="iszheng_info layui-hide"><td class="tt">整改完成日期</td><td class="tv" id="zhengdt" colspan="3"></td></tr>
                <tr class="iszheng_info layui-hide"><td class="tt">整改情况说明</td><td class="tv" id="gaishuo" colspan="3"></td></tr>

                <tr><td class="tt">备注</td><td class="tv" id="explain" colspan="3"></td></tr>
                </tbody>
            </table>
        </div>

        <div><?php include "../public/upinfo_show.php";?></div>

        <div><?php include "../public_flow/flow_show_flowrelas.php";?></div>

        <div><?php include '../public_flow/flow_show_shenlog.php'?></div>
        <div><?php include '../public_flow/flow_show_talk.php'?></div>
        <div><?php include '../public/opt_browse.php'?></div>
    </div>
</div>
<script>
    var param_id = getQueryVariable('id') || 0;

    layui.use(['form', 'layer', "laytp",'element','dropdown','laypage','table','soulTable'], function() {
        var laypage = layui.laypage, table = layui.table, dropdown = layui.dropdown, form = layui.form, soulTable = layui.soulTable,element = layui.element;

        facade.ajax({url: ask_engin_cha_show, data:{id: param_id}}).done(function(res){
            if (res.code === 2000) {
                var data = res.data.data;
                var engininfo = res.data.engininfo;
                if(engininfo){
                    $("#enginid_name").text(engininfo.name).click(function () {
                        openPage('../engin/show.php?id='+engininfo.id);
                    });
                }



                $("#chatype_name").text(data.chatype_name);
                $("#chaer").text(data.chaer);
                $("#chadt").text(data.chadt);
                $("#chagai").text(data.chagai);
                $("#cunwen").text(data.cunwen);
                $("#isxu").text(data.isxu);
                $("#gaiqiu").text(data.gaiqiu);
                $("#gaier").text(data.gaier);
                $("#yaodt").text(data.yaodt);
                $("#iszheng").text(data.iszheng);
                $("#zhengdt").text(data.zhengdt);
                $("#gaishuo").text(data.gaishuo);
                $("#explain").text(data.explain);



                if(data.isxu == '是'){
                    $(".isxu_info").removeClass('layui-hide');
                    if(data.iszheng == '是'){
                        $(".iszheng_info").removeClass('layui-hide');
                    }
                }


                public_flow_show_display(res.data.billinfo);
                public_upload_show_file('upload_files', res.data.files);
                render_from();
            }
        });

        public_get_readsandlog('engin_cha', param_id);
    });



</script>
</body>
</html>




